package com.qf;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient //开启服务发现的功能
public class PaymentApplication8011 {
    public static void main(String[] args) {
        SpringApplication.run(PaymentApplication8011.class,args);
    }

    /**
     * 向容器里面注入RestTemplate组件
     * RestTemplate：在springCloud中进行服务远程调用的工具。基于Http协议的远程调用工具。
     * @return
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
